﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameStudio.CodeGeneration;
using System.CodeDom;
using System.Reflection;

namespace GameStudio.Common
{
    public class GCPosition : Sample
    {

        public GCPosition(string strFileName, string Path, string NameSpace)
            : base(strFileName, Path, NameSpace)
        {

            base.AssignObjects();

            base.Init();
            targetClass.IsStruct = true;
            targetClass.TypeAttributes = TypeAttributes.Public;

        }

        protected void AddMyFields()
        {
            CodeMemberField mf = base.AddFields("PositionX", typeof(double));
            mf.Attributes = MemberAttributes.Public;
            targetClass.Members.Add(mf);

            mf = base.AddFields("PositionY", typeof(double));
            mf.Attributes = MemberAttributes.Public;
            targetClass.Members.Add(mf);

            mf = base.AddFields("PositionZ", typeof(double));
            mf.Attributes = MemberAttributes.Public;
            targetClass.Members.Add(mf);
        }

        public void Generate(string file)
        {
            AddMyFields();
            base.GenerateCSharpCode();
        }
    }
}
